import requests

# 代理ip
# proxy = {
#     'http': 'http://182.140.244.163:8118	',
#     'https': 'https://182.140.244.163:8118'
#
# }
proxy = {
    'http': 'http://36.134.91.82:8888',
}
url = 'https://www.baidu.com/s?'

data = {
    'wd': 'hello'
}

headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36'
}
resp = requests.get(url, params=data, proxies=proxy)
resp.encoding = 'utf-8'
# print(resp.text)
with open('../代理/ip.html', 'w') as f:
    f.write(resp.text)
